{if (($user_mode eq 1) OR ($user_mode eq 0)) AND ($user_mode!="") }
    <table id="bp_list"></table>
    <div id="bp_list_buttom" name="bp_list_buttom"></div>
    <div id="bp_go" name="bp_go"></div>
{/if}
{if (($user_mode eq 1) OR ($user_mode eq 0)) AND ($user_mode!="") }
    <table id="bp_xml"></table>
    <div id="bp_xml_footer" name="bp_xml_footer"></div>
    <div id="bp_xml_info" name="bp_xml_info"></div>
{/if}
<div class="tabbable"> <!-- Only required for left/right tabs -->
  <ul class="nav nav-tabs">
    <li class="active"><a href="#tab1" data-toggle="tab">Общая информация</a></li>
    <li><a href="#tab2" data-toggle="tab">Сотрудники</a></li>
    <li><a href="#tab3" data-toggle="tab">Выполнение планов</a></li>
    <li><a href="#tab4" data-toggle="tab">Алкогольные новости</a></li>
    <li><a href="#tab5" data-toggle="tab">БП "Брак" в работе</a></li>    
  </ul>
</div>    

  <div class="tab-content">
    <div class="tab-pane active" id="tab1">
      <div class="row-fluid">
        <div class="row-fluid">
            <div class="span6">
                <span class="label label-info">Полезная информация</span>
                    <div class="well">		
                        <p>{$stiker_body}</p>		
                    </div>                             
            </div>
            <div class="span6">
                    <span class="label label-info">Новости,обьявления</span>
                    <div class="well" id=newslist name=newslist></div>    
                    <ul class="pager">
                        <li class="previous"><a href="#" id=newsprev name=newsprev>&larr; Назад</a></li>
                        <li class="next"><a href="#" id=newsnext name=newsnext>Вперед &rarr;</a></li>
                    </ul>      
            </div>
        </div>
      </div>	
    </div>       
    <script type="text/javascript" src="controller/client/js/news_main.js"></script>

    <div class="tab-pane" id="tab4">
        <div class="row-fluid">
    	{section name=i loop=$ArrayRss}
            <legend><a href="{$ArrayRss[i]["link"]}" target="_blank">{$ArrayRss[i]["title"]}</a></legend>
            <p>{$ArrayRss[i]["descc"]}</p>
        {/section}
        </div>	
    </div>        
        
        
   <div class="tab-pane" id="tab3">
      <div class="row-fluid">
          <small>
  <table class="table table-bordered table-condensed table-hover">   
  <thead>
    <tr>
        <th colspan="1" rowspan="2" style="vertical-align: top;">Номенклатура</th>
        <th colspan="2" rowspan="1" style="vertical-align: top; text-align: center;">Выпуск ГП</th>
        <th colspan="2" rowspan="1" style="vertical-align: top; text-align: center;">План производства</th>
        <th colspan="2" rowspan="1" style="vertical-align: top; text-align: center;">Отклонение от плана</th>
        <th colspan="1" rowspan="2" style="vertical-align: top; text-align: center;">% выполнения</th>
        <th colspan="2" rowspan="1" style="vertical-align: top; text-align: center;">Отгружено</th>
    </tr>
    <tr>
        <th style="vertical-align: top; text-align: right;">Бут</th>
        <th style="vertical-align: top; text-align: right;">Дал</th>
        <th style="vertical-align: top; text-align: right;">Бут</th>
        <th style="vertical-align: top; text-align: right;">Дал</th>
        <th style="vertical-align: top; text-align: right;">Бут</th>
        <th style="vertical-align: top; text-align: right;">Дал</th>
        <th style="vertical-align: top; text-align: right;">Бут</th>
        <th style="vertical-align: top; text-align: right;">Дал</th>
    </tr>
  </thead>            
  <tbody>    
        {$cn=0}
	{section name=i loop=$ArrayPlans}
        {$cn=$cn+1}
    <tr {if $ArrayPlans[i]["prpr"]|string_format:"%.2f" ge "100"} class="success"{/if} {if $ArrayPlans[i]["nom"]|count_characters==0} class="error"{/if}>
        <td style="vertical-align: top;">{$ArrayPlans[i]["nom"]}{if $ArrayPlans[i]["nom"]|count_characters==0}<strong>{$ArrayPlans[i]["tm"]}</strong>{/if}</td>
        <td style="vertical-align: top; text-align: right;">{$ArrayPlans[i]["vpkol"]}</td>
        <td style="vertical-align: top; text-align: right;">{$ArrayPlans[i]["vpdal"]}</td>
        <td style="vertical-align: top; text-align: right;">{$ArrayPlans[i]["plprkol"]}</td>
        <td style="vertical-align: top; text-align: right;">{$ArrayPlans[i]["plprdal"]}</td>
        <td style="vertical-align: top; text-align: right;">{$ArrayPlans[i]["protklplkol"]}</td>
        <td style="vertical-align: top; text-align: right;">{$ArrayPlans[i]["protklpldal"]}</td>
        <td style="vertical-align: top; text-align: center;"><strong>{$ArrayPlans[i]["prpr"]}</strong></td>
        <td style="vertical-align: top; text-align: right;">{$ArrayPlans[i]["otgrkol"]}</td>
        <td style="vertical-align: top; text-align: right;">{$ArrayPlans[i]["otgrdal"]}</td>
    </tr>            
        {/section}
    <tr class="info">
        <td style="vertical-align: top;"><strong>ИТОГО:</strong></td>
        <td style="vertical-align: top; text-align: right;"><strong>{$ArrayPlans[$cn-1]["vpkol_i"]}</strong></td>
        <td style="vertical-align: top; text-align: right;"><strong>{$ArrayPlans[$cn-1]["vpdal_i"]}</strong></td>
        <td style="vertical-align: top; text-align: right;"><strong>{$ArrayPlans[$cn-1]["plprkol_i"]}</strong></td>
        <td style="vertical-align: top; text-align: right;"><strong>{$ArrayPlans[$cn-1]["plprdal_i"]}</strong></td>
        <td style="vertical-align: top; text-align: right;"><strong>{$ArrayPlans[$cn-1]["protklplkol_i"]}</strong></td>
        <td style="vertical-align: top; text-align: right;"><strong>{$ArrayPlans[$cn-1]["protklpldal_i"]}</strong></td>
        <td style="vertical-align: top; text-align: center;"><strong>{$ArrayPlans[$cn-1]["prpr_i"]}</strong></td>
        <td style="vertical-align: top; text-align: right;"><strong>{$ArrayPlans[$cn-1]["otgrkol_i"]}</strong></td>
        <td style="vertical-align: top; text-align: right;"><strong>{$ArrayPlans[$cn-1]["otgrdal_i"]}</strong></td>
    </tr>                    
          </tbody>  
        </table>
          </small>
     </div>	
   </div>        
        
        
    <div class="tab-pane" id="tab2">
              <span class="label label-info">Кого нет</span>
        <div class="well">		
		{section name=i loop=$ArrayUsersProfile}
                    {if $ArrayUsersProfile[i]["faza"]!="Работает"}
                        <a target='_blank' href=?content_page=eq_list&usid={$ArrayUsersProfile[i]["id"]}>
                        <i class="icon-user"></i>{$ArrayUsersProfile[i]["fio"]}</a> в {$ArrayUsersProfile[i]["faza"]} до {$ArrayUsersProfile[i]["enddate"]}<br>
                    {/if}
                {/section}
	</div> 
<div class="row-fluid">
    <div class="span12">               
  <div class="accordion-group">
    <div class="accordion-heading">
      <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne">
        <span class="label label-info">Пользователи системы (Нажмите чтобы развернуть)</span>
      </a>
    </div>
    <div id="collapseOne" class="accordion-body collapse">
      <div class="accordion-inner">
	{section name=i loop=$ArrayUsers}
	 <i class="icon-user"></i><a target='_blank' href=?content_page=eq_list&usid={$ArrayUsers[i]["id"]}>{$ArrayUsers[i]["login"]}</a> 
        {/section}
      </div>
    </div>
  </div>
    </div>        
</div>       
        
    </div>
      
          <div class="tab-pane" id="tab5">
      <div class="row-fluid">
          <div class="span12">
            
                <table id="bp_xml_c" width='100%' border=1></table>
                <div id="bp_xml_footer_c" name="bp_xml_footer_c"></div>
                <div id="bp_xml_info_c" name="bp_xml_info_c"></div>                                  
            
            
            </div>	
    </div>	
    </div>    
      
      
  </div>


 <script>$(".collapseOne").collapse('hide');</script>
 <script type="text/javascript" src="controller/client/js/home.js"></script> 
 {if (($user_mode eq 1) OR ($user_mode eq 0)) AND ($user_mode!="") }
    <script type="text/javascript" src="controller/client/js/bp_list.js"></script>
    <script type="text/javascript" src="controller/client/js/bp_xml_list.js"></script>
    <script type="text/javascript" src="controller/client/js/bp_xml_list_c.js"></script>    
{/if}